package com.cl.short_video_java.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cl.short_video_java.dto.VideoDetail;
import com.cl.short_video_java.pojo.VideoUser;
import com.cl.short_video_java.pojo.VideoVideo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cl.short_video_java.vo.video.*;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.github.pagehelper.PageInfo;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;

/**
 * @author object
 * @description 针对表【video_video】的数据库操作Service
 * @createDate 2024-10-31 15:59:00
 */
public interface VideoVideoService extends IService<VideoVideo> {

	PageInfo<VideoVideo> getPageVideoService(MangementSearch videoMangementSearch);

	Object updataTypeService(VideoUpRequest videoUpRequest);

	Boolean deleteService(String idlist);

	Boolean reviewVideoService(String idlist, Integer status, HttpServletRequest httpServletRequest);

	Boolean setIsRecommendService(Integer isrecommend, Integer id);

	void getBank() throws JsonProcessingException;

	void updateSort();

	List<?> getRecommon(Integer pageNum) throws JsonProcessingException;


	Object upVideoService(MultipartFile chunk, Integer chunkIndex, Integer totalChunks, String uuid) throws Exception;

	String insertVideoService(InserytVideo video, HttpServletRequest httpServletRequest) throws Exception;

	Page<VideoVideo> getPage(VideoSearch videoSearch);

	Map<String, Double> getRate(String[] split);

	Page<VideoVideo> videoByUser(Integer uid, Integer current);

	boolean getType(Integer vid, VideoUser user);

	VideoDetail info(Integer vid, Integer uid);

	void like(Integer vid, Integer uid, Integer model);

	void collect(Integer vid, Integer id, Integer model);

	void buy(Integer vid, VideoUser uid);

	ResponseEntity<?> upVideoFtpService(MultipartFile chunk, Integer chunkIndex, Integer totalChunks, String uuid) throws Exception;

	Page<VideoVideo> hit(Integer pageNum);

	Object upVieoOssService(MultipartFile chunk, Integer chunkIndex, Integer totalChunks, String uuid) throws IOException;

	Integer upVideoTemService(MultipartFile chunk, Integer chunkIndex, Integer totalChunks, String uuid) throws IOException;

	Object VideoMergeService(String uuid, Integer total) throws IOException;

	String delVideoService(String img, String video);
	void asyncFileInputStream(InputStream inputStream, String uuid, Integer chunkIndex) throws IOException;
}
